#ifndef     __HTTP_H
#define     __HTTP_H

#include <string>
#include "../rt/task2.h"
#include <exception>
#include <nlohmann/json.hpp>

namespace net::http {

template <typename T>
using Task = rt::Task2<T>;

Task<std::string> get(std::string&& url);
Task<std::string> post(std::string&& url, std::string&& body);

class HttpException : public std::exception {

    using P = std::exception;

    using P::P;
};



}

#endif
